#ifndef _RPCGLOABLETABLES_H_
#define _RPCGLOABLETABLES_H_

#ifdef __cplusplus
extern "C"{
#endif


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <termios.h>
#include <pthread.h>

#include <netdb.h>
#include <signal.h>
#include <math.h>
#include <time.h>
#include <stdarg.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <net/if_arp.h>
#include <arpa/inet.h>
#include <dirent.h>
#include <sys/un.h>


#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/socket.h> 
#include <sys/mman.h>
#include <sys/ioctl.h>


#define taskDelay(a)					usleep(a * 100)
#if 1
#define RPC_DEBUG
#endif
#ifdef RPC_DEBUG
#define RPCDebugOut(fmt, args...) printf(fmt,##args);
#else
#define RPCDebugOut(fmt, args...)
#endif


int (*pRpcGetSysInfo[100]) (unsigned char *request,unsigned char *result,int *return_param_num,int *return_bytes);


int (*pRpcSubFunc[100])(unsigned char *request,unsigned char *result,int *return_param_num,int *return_bytes);

int (*pRpcSubGrpFunc[100])(unsigned char *request,unsigned char *result,int *return_param_num,int *return_bytes);

int (*pRpcAppFunc[100])(unsigned char *request,unsigned char *result,int *return_param_num,int *return_bytes);

int (*pRpcAppGrpFunc[100])(unsigned char *request,unsigned char *result,int *return_param_num,int *return_bytes);

int (*pRpcSessionFunc[100])(unsigned char *request,unsigned char *result,int *return_param_num,int *return_bytes);




#define RPC_SUBSCRIBER_START_ID 0
#define RPC_SUBSCRIBER_END_ID 99

#define RPC_SUBSCRIBER_GROUP_START_ID 200
#define RPC_SUBSCRIBER_GROUP_END_ID 299

#define RPC_APPLICATION_START_ID 400
#define RPC_APPLICATION_END_ID 499

#define RPC_APPLICATION_GROUP_START_ID 600
#define RPC_APPLICATION_GROUP_END_ID 699

#define RPC_SESSION_START_ID 800
#define RPC_SESSION_END_ID 899

#define RPC_POLICY_START_ID 1000
#define RPC_POLICY_END_ID 1099

#define RPC_PIPE_START_ID 1100
#define RPC_PIPE_END_ID 1199

#define RPC_SERVER_START_ID 1200
#define RPC_SERVER_END_ID 1299

#define RPC_POS_ETHERNET_START_ID 1300
#define RPC_POS_ETHERNET_END_ID 1399
#define RPC_STATISTICS_START_ID 1400
#define RPC_STATISTICS_END_ID 1499


#define RPC_STAT_ACC_SUB_START_ID 1500
#define RPC_STAT_ACC_SUB_END_ID 1599

#define RPC_STAT_APP_START_ID 1600
#define RPC_STAT_APP_END_ID 1699

#define RPC_STAT_POL_START_ID 1700
#define RPC_STAT_POL_END_ID 1799

#define RPC_STAT_SYSINFO_START_ID 1800
#define RPC_STAT_SYSINFO_END_ID 1899

#define RPC_STAT_SUB_START_ID 1900
#define RPC_STAT_SUB_END_ID 1999

#define RPC_ACC_SUB_START_ID 2000
#define RPC_ACC_SUB_END_ID 2099

#define RPC_PACKAGE_START_ID 2100
#define RPC_PACKAGE_END_ID 2199

#define RPC_SYS_START_ID 2200
#define RPC_SYS_END_ID 2299

#define RPC_OTHERS_START_ID 2300
#define RPC_OTHERS_END_ID 2399

#define RPC_BYPASS_START_ID 2400
#define RPC_BYPASS_END_ID 2499

#define RPC_SKYPE_START_ID 2500
#define RPC_SKYPE_END_ID 2599

#define RPC_NETFLOW_START_ID  2600
#define RPC_NETFLOW_END_ID  2699

#ifdef __cplusplus
}
#endif
#endif
